package org.vectrics.recruiter;

/**
 * @author mmoore
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public class GuiUtils {

	public static String getSectionHeader(String contextPath, String caption) {
		return(getSectionHeader(contextPath, caption, "100%"));
	}
	
	public static String getSectionHeader(String contextPath, String caption, String width) {
		StringBuffer html = new StringBuffer();
		html.append("<table cellpadding=\"0\" cellspacing=\"0\" width=\"" + width + "\"><tr></tr><tr><td></td><td><img src=\"" + contextPath + "/graphics/cleardot.gif\" width=\"160\" height=\"1\"></td><td></td><td></td></tr><tr>");
		html.append("<td width=\"0\" valign=\"top\"><img src=\"" + contextPath + "/graphics/section-left.gif\" height=\"22\"></td>");
		//html.append("<td valign=\"top\" background=\"" + contextPath + "/graphics/section-dot.gif\"><img width=\"1\" height=\"22\" src=\"" + contextPath + "/graphics/section-dot.gif\"><font class=\"sectionFont\">" + caption + "</font></td>");
		html.append("<td width=\"0\" valign=\"center\" class=\"sectionBg\"background=\"" + contextPath + "/graphics/section-dot.gif\"><font class=\"sectionFont\">" + caption + "</font></td>");
		html.append("<td width=\"0\" valign=\"top\"><img src=\"" + contextPath + "/graphics/section-right.gif\" height=\"22\"></td>");
		html.append("<td width=\"100%\"  valign=\"bottom\"><img width=\"100%\" height=\"1\" src=\"" + contextPath + "/graphics/section-dot.gif\"></td>");
		html.append("</tr></table>");
		
		return(html.toString());
	}
}
